package com.gitee.jmash.storage.service;

import java.util.Set;
import java.util.UUID;
import com.gitee.jmash.core.orm.tenant.TenantService;
import com.gitee.jmash.storage.entity.StorageOrganInfoEntity;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jmash.storage.protobuf.StorageOrganInfoCreateReq;
import jmash.storage.protobuf.StorageOrganInfoEnableKey;
import jmash.storage.protobuf.StorageOrganInfoUpdateReq;
import jmash.storage.protobuf.StorageOrganKey;

/**
 * storage_organ_info服务Write接口.
 *
 * @author <a href="mailto:service@crenjoy.com">crenjoy</a>
 */
public interface StorageOrganInfoWrite extends TenantService {

  /** 插入实体. */
  public StorageOrganInfoEntity insert(@NotNull @Valid StorageOrganInfoCreateReq storageOrganInfo);

  /** 启用/禁用. */
  public boolean enable(@NotNull StorageOrganInfoEnableKey storageOrganInfoEnableKey);

  /** 根据主键删除. */
  public StorageOrganInfoEntity delete(@NotNull UUID entityId);

  /** 根据组织ID、服务类型删除. */
  public int deleteByIdAndType(@NotNull @Valid StorageOrganKey req);

  /** 根据主键数组删除. */
  public Integer batchDelete(@NotNull @Valid Set<@NotNull UUID> entityIds);

  /** update 实体. */
  StorageOrganInfoEntity update(StorageOrganInfoUpdateReq request);
}
